﻿/* ****************************************************************************
 *
 * Copyright (c) Microsoft Corporation. 
 *
 * This source code is subject to terms and conditions of the Microsoft Public License. A
 * copy of the license can be found at http://go.microsoft.com/fwlink/?LinkID=131993. If
 * you cannot locate the Microsoft Public License, please send an email to
 * mixon@microsoft.com. By using this source code in any fashion, you are agreeing to
 * be bound by the terms of the Microsoft Public License.
 *
 * You must not remove this notice, or any other, from this software.
 *
 *
 * ***************************************************************************/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace MIXOnline.Descry.Controls
{
    public partial class CustomTreeMapItem : TreeMapPanelItem
    {
        // default constructor
        public CustomTreeMapItem()
        {
            InitializeComponent();
        }
        
        // secondary constructor that accepts a TreeMapItem
        public CustomTreeMapItem(TreeMapItem item)
        {
            // this must be called to load the associated XAML file, since 
            // the default constructor is not called when this class is created.
            InitializeComponent(); 

            textBlock.Text = item.Label; // set the label

            ToolTipService.SetToolTip(this, item.Label); // set the tooltip
        }
    }
}
